<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">




<title>Castle ActiveRecord学习实践（8）：数据有效性的验证 - TerryLee's Tech Space - 博客园</title>
<meta name="keywords" content="11,数据持久,12,开源世界,Castle,ActiveRecord学习实践,数据有效性的验证">
<meta name="description" content="在我们录入数据时，对数据有效性的验证是必不可少的， ActiveRecord中如何去验证数据的有效性呢？本文将详细介绍这一内容。主要内容1．概述2．使用Validation3．如何扩展4．深入分析验证">




<link title="RSS" type="application/rss+xml" rel="alternate" href="http://www.cnblogs.com/Terrylee/rss">
<link title="RSD" type="application/rsd+xml" rel="EditURI" href="http://www.cnblogs.com/Terrylee/rsd.xml"> 
  



<link rel="stylesheet" type="text/css" href="index.css" media="all">
</head>
<body>
    <form name="Form1" method="post" action="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html" id="Form1">
<div>
<input name="__EVENTTARGET" id="__EVENTTARGET" value="" type="hidden">
<input name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" type="hidden">
<input name="__VIEWSTATE" id="__VIEWSTATE" value="" type="hidden">
</div>




        <link rel="shortcut icon" href="blogengine.ico">
<!--done-->
<div id="home">
<div id="header">
	<div id="blogTitle">
	<a id="lnkBlogLogo" href="http://www.cnblogs.com/Terrylee/"><img id="blogLogo" src="logo.gif" alt="返回主页"></a>			
		
<!--done-->
<h1><a id="Header1_HeaderTitle" class="headermaintitle" href="http://www.cnblogs.com/Terrylee/">TerryLee's Tech Space</a></h1>
<h2>TerryLee技术专栏</h2>



		
	</div><!--end: blogTitle 博客的标题和副标题 -->
	<div id="navigator">
		
<!--done-->
			<ul id="navList">
				<li><a id="MyLinks1_HomeLink" class="menu" href="http://www.cnblogs.com/">博客园</a></li>
				<li><a id="MyLinks1_SpaceLink" class="menu" href="http://space.cnblogs.com/">社区</a></li>
				<li><a id="MyLinks1_MyHomeLink" class="menu" href="http://www.cnblogs.com/Terrylee/">首页</a></li>
				<li><a id="MyLinks1_NewPostLink" class="menu" href="http://www.cnblogs.com/Terrylee/admin/EditPosts.aspx?opt=1">新随笔</a></li>
				<li><a id="MyLinks1_ContactLink" accesskey="9" class="menu" href="http://space.cnblogs.com/msg/send/TerryLee">联系</a></li>
				<li><a id="MyLinks1_Admin" class="menu" href="http://www.cnblogs.com/Terrylee/admin/EditPosts.aspx">管理</a></li>
				<li><a id="MyLinks1_Syndication" class="menu" href="http://www.cnblogs.com/Terrylee/rss">订阅</a>
				<a id="MyLinks1_XMLLink" class="aHeaderXML" href="http://www.cnblogs.com/Terrylee/rss"><img src="rss.gif" alt="订阅" style="border-width: 0px;"></a></li>
			</ul>


		<div class="blogStats">
			
			
<!--done-->
随笔- 491&nbsp;
文章- 3&nbsp;
评论- 15367&nbsp;

			
		</div><!--end: blogStats -->
	</div><!--end: navigator 博客导航栏 -->
</div><!--end: header 头部 -->

<div id="main">
	<div id="mainContent">
	<div class="forFlow">
		
					
<!--done-->
<div id="topics">
	<div class="post">
		<h1 class="postTitle">
			<a id="ctl04_TitleUrl" class="postTitle2" href="http://www.cnblogs.com/Terrylee/archive/2006/04/13/374173.html">Castle ActiveRecord学习实践（8）：数据有效性的验证</a>
		</h1>
		<div class="clear"></div>
		<div class="postBody">
			<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">摘要：在我们录入数据时，对数据有效性的验证是必不可少的，</span><span style="font-size: 10pt; line-height: 150%;"> <span lang="EN-US">ActiveRecord</span></span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">中如何去验证数据的有效性呢？本文将详细介绍这一内容。</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><b style=""><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">主要内容</span></b><b style=""><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">1</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">．概述<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">2</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">．使用<span lang="EN-US">Validation<o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">3</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">．如何扩展</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">4</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">．深入分析验证<br><br></span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p></o:p></span></o:p></span></p>

<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><b style=""><span style="font-size: 10pt; color: rgb(0, 102, 153); line-height: 150%; font-family: 宋体;">一．概述</span></b><b style=""><span style="font-size: 10pt; color: rgb(0, 102, 153); line-height: 150%;" lang="EN-US"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">在录入数据时，对数据有效性的验证是必不可少的，很多时候我们在</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">UI</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">层上就会做一层验证，但有时也需要在底层做一些必要的处理，这就要用到</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">ActiveRecord</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">中的数据有效性的验证。</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">ActiveRecord</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">为我们提供了如下几个验证：</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 31.5pt; text-indent: -21pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: Wingdings;" lang="EN-US"><span style="">n<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">ValidateEmail <o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 31.5pt; text-indent: -21pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: Wingdings;" lang="EN-US"><span style="">n<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">ValidateIsUnique <o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 31.5pt; text-indent: -21pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: Wingdings;" lang="EN-US"><span style="">n<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">ValidateRegExp <o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 31.5pt; text-indent: -21pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: Wingdings;" lang="EN-US"><span style="">n<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">ValidateNotEmpty <o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 31.5pt; text-indent: -21pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: Wingdings;" lang="EN-US"><span style="">n<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">ValidateConfirmation<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><b style=""><span style="font-size: 10pt; color: rgb(0, 102, 153); line-height: 150%; font-family: 宋体;">二．如何使用</span></b><b style=""><span style="font-size: 10pt; color: rgb(0, 102, 153); line-height: 150%;" lang="EN-US"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">为了使用上面这些验证，我们必须用</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">ActiveRecordValidationBase</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">来代替</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">ActiveRecordBase</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">，即实体类必须继承于</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">ActiveRecordValidationBase</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">。</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"></span></p>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="none.gif" align="top"><span style="color: rgb(0, 0, 0);">[ActiveRecord(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Customs</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)]<br><img src="none.gif" align="top"><br><img src="none.gif" align="top"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">&nbsp;Custom&nbsp;:&nbsp;ActiveRecordValidationBase<br><img src="none.gif" align="top"><br><img id="Codehighlighter1_77_88_Open_Image" onclick="this.style.display='none'; Codehighlighter1_77_88_Open_Text.style.display='none'; Codehighlighter1_77_88_Closed_Image.style.display='inline'; Codehighlighter1_77_88_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_77_88_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_77_88_Closed_Text.style.display='none'; Codehighlighter1_77_88_Open_Image.style.display='inline'; Codehighlighter1_77_88_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"></span><span id="Codehighlighter1_77_88_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_77_88_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//<br><img src="inblock.gif" align="top"></span><span style="color: rgb(0, 0, 0);"><br><img src="expandedblockend.gif" align="top">}</span></span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%; text-align: left;" align="left"><br>ActiveRecordValidationBase<span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">类为我们提供了如下一个方法和属性：</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p></o:p></span></p>
<table class="MsoTableGrid" style="border: medium none ; border-collapse: collapse;" border="1" cellpadding="0" cellspacing="0">
    <tbody>
        <tr style="">
            <td style="border: 1pt solid windowtext; padding: 0cm 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; width: 140.4pt;" valign="top" width="187">
            <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%; text-align: center;" align="center"><b style=""><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">方法</span></b><b style=""><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">|</span></b><b style=""><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">属性</span></b><b style=""><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p></o:p></span></b></p>
            </td>
            <td style="border-style: solid solid solid none; border-color: windowtext windowtext windowtext rgb(212, 208, 200); border-width: 1pt 1pt 1pt medium; padding: 0cm 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; width: 285.7pt;" valign="top" width="381">
            <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%; text-align: center;" align="center"><b style=""><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">说明</span></b><b style=""><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p></o:p></span></b></p>
            </td>
        </tr>
        <tr style="">
            <td style="border-style: none solid solid; border-color: rgb(212, 208, 200) windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 140.4pt; background-color: transparent;" valign="top" width="187">
            <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">IsValid()<o:p></o:p></span></p>
            </td>
            <td style="border-style: none solid solid none; border-color: rgb(212, 208, 200) windowtext windowtext rgb(212, 208, 200); border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 285.7pt; background-color: transparent;" valign="top" width="381">
            <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">返回验证是否通过</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p></o:p></span></p>
            </td>
        </tr>
        <tr style="">
            <td style="border-style: none solid solid; border-color: rgb(212, 208, 200) windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 140.4pt; background-color: transparent;" valign="top" width="187">
            <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">ValidationErrorMessages<o:p></o:p></span></p>
            </td>
            <td style="border-style: none solid solid none; border-color: rgb(212, 208, 200) windowtext windowtext rgb(212, 208, 200); border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 285.7pt; background-color: transparent;" valign="top" width="381">
            <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">获取验证错误信息数组</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p></o:p></span></p>
            </td>
        </tr>
    </tbody>
</table>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">下面看一个完整的例子代码，在这个程序中我们需要验证用户名不能为空，</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">Email</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">地址、邮政编码、电话号码的格式是否正确</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;"></span></p>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="none.gif" align="top"><span style="color: rgb(0, 0, 0);">[ActiveRecord(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Customs</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)]<br><img src="none.gif" align="top"><br><img src="none.gif" align="top"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">&nbsp;Custom&nbsp;:&nbsp;ActiveRecordValidationBase<br><img src="none.gif" align="top"><br><img id="Codehighlighter1_77_1456_Open_Image" onclick="this.style.display='none'; Codehighlighter1_77_1456_Open_Text.style.display='none'; Codehighlighter1_77_1456_Closed_Image.style.display='inline'; Codehighlighter1_77_1456_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_77_1456_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_77_1456_Closed_Text.style.display='none'; Codehighlighter1_77_1456_Open_Image.style.display='inline'; Codehighlighter1_77_1456_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"></span><span id="Codehighlighter1_77_1456_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_77_1456_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">&nbsp;_id;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;_name;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;_email;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;_address;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;_post;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;_phone;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;[PrimaryKey(PrimaryKeyType.Native)]<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">&nbsp;ID<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_348_424_Open_Image" onclick="this.style.display='none'; Codehighlighter1_348_424_Open_Text.style.display='none'; Codehighlighter1_348_424_Closed_Image.style.display='inline'; Codehighlighter1_348_424_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_348_424_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_348_424_Closed_Text.style.display='none'; Codehighlighter1_348_424_Open_Image.style.display='inline'; Codehighlighter1_348_424_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_348_424_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_348_424_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_363_382_Open_Image" onclick="this.style.display='none'; Codehighlighter1_363_382_Open_Text.style.display='none'; Codehighlighter1_363_382_Closed_Image.style.display='inline'; Codehighlighter1_363_382_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_363_382_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_363_382_Closed_Text.style.display='none'; Codehighlighter1_363_382_Open_Image.style.display='inline'; Codehighlighter1_363_382_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">get</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span id="Codehighlighter1_363_382_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_363_382_Open_Text"><span style="color: rgb(0, 0, 0);">{&nbsp;</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._id;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_397_417_Open_Image" onclick="this.style.display='none'; Codehighlighter1_397_417_Open_Text.style.display='none'; Codehighlighter1_397_417_Closed_Image.style.display='inline'; Codehighlighter1_397_417_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_397_417_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_397_417_Closed_Text.style.display='none'; Codehighlighter1_397_417_Open_Image.style.display='inline'; Codehighlighter1_397_417_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">set</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span id="Codehighlighter1_397_417_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_397_417_Open_Text"><span style="color: rgb(0, 0, 0);">{&nbsp;</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._id&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;value;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;[Property,ValidateNotEmpty]<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;Name<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_494_574_Open_Image" onclick="this.style.display='none'; Codehighlighter1_494_574_Open_Text.style.display='none'; Codehighlighter1_494_574_Closed_Image.style.display='inline'; Codehighlighter1_494_574_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_494_574_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_494_574_Closed_Text.style.display='none'; Codehighlighter1_494_574_Open_Image.style.display='inline'; Codehighlighter1_494_574_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_494_574_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_494_574_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_509_530_Open_Image" onclick="this.style.display='none'; Codehighlighter1_509_530_Open_Text.style.display='none'; Codehighlighter1_509_530_Closed_Image.style.display='inline'; Codehighlighter1_509_530_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_509_530_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_509_530_Closed_Text.style.display='none'; Codehighlighter1_509_530_Open_Image.style.display='inline'; Codehighlighter1_509_530_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">get</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span id="Codehighlighter1_509_530_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_509_530_Open_Text"><span style="color: rgb(0, 0, 0);">{&nbsp;</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._name;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_545_567_Open_Image" onclick="this.style.display='none'; Codehighlighter1_545_567_Open_Text.style.display='none'; Codehighlighter1_545_567_Closed_Image.style.display='inline'; Codehighlighter1_545_567_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_545_567_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_545_567_Closed_Text.style.display='none'; Codehighlighter1_545_567_Open_Image.style.display='inline'; Codehighlighter1_545_567_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">set</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span id="Codehighlighter1_545_567_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_545_567_Open_Text"><span style="color: rgb(0, 0, 0);">{&nbsp;</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._name&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;value;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;[Property,ValidateEmail]<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;Email<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_642_724_Open_Image" onclick="this.style.display='none'; Codehighlighter1_642_724_Open_Text.style.display='none'; Codehighlighter1_642_724_Closed_Image.style.display='inline'; Codehighlighter1_642_724_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_642_724_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_642_724_Closed_Text.style.display='none'; Codehighlighter1_642_724_Open_Image.style.display='inline'; Codehighlighter1_642_724_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_642_724_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_642_724_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_657_679_Open_Image" onclick="this.style.display='none'; Codehighlighter1_657_679_Open_Text.style.display='none'; Codehighlighter1_657_679_Closed_Image.style.display='inline'; Codehighlighter1_657_679_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_657_679_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_657_679_Closed_Text.style.display='none'; Codehighlighter1_657_679_Open_Image.style.display='inline'; Codehighlighter1_657_679_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">get</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span id="Codehighlighter1_657_679_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_657_679_Open_Text"><span style="color: rgb(0, 0, 0);">{&nbsp;</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._email;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_694_717_Open_Image" onclick="this.style.display='none'; Codehighlighter1_694_717_Open_Text.style.display='none'; Codehighlighter1_694_717_Closed_Image.style.display='inline'; Codehighlighter1_694_717_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_694_717_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_694_717_Closed_Text.style.display='none'; Codehighlighter1_694_717_Open_Image.style.display='inline'; Codehighlighter1_694_717_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">set</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span id="Codehighlighter1_694_717_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_694_717_Open_Text"><span style="color: rgb(0, 0, 0);">{&nbsp;</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._email&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;value;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;[Property]<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;Address<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_780_866_Open_Image" onclick="this.style.display='none'; Codehighlighter1_780_866_Open_Text.style.display='none'; Codehighlighter1_780_866_Closed_Image.style.display='inline'; Codehighlighter1_780_866_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_780_866_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_780_866_Closed_Text.style.display='none'; Codehighlighter1_780_866_Open_Image.style.display='inline'; Codehighlighter1_780_866_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_780_866_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_780_866_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_795_819_Open_Image" onclick="this.style.display='none'; Codehighlighter1_795_819_Open_Text.style.display='none'; Codehighlighter1_795_819_Closed_Image.style.display='inline'; Codehighlighter1_795_819_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_795_819_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_795_819_Closed_Text.style.display='none'; Codehighlighter1_795_819_Open_Image.style.display='inline'; Codehighlighter1_795_819_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">get</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span id="Codehighlighter1_795_819_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_795_819_Open_Text"><span style="color: rgb(0, 0, 0);">{&nbsp;</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._address;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_834_859_Open_Image" onclick="this.style.display='none'; Codehighlighter1_834_859_Open_Text.style.display='none'; Codehighlighter1_834_859_Closed_Image.style.display='inline'; Codehighlighter1_834_859_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_834_859_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_834_859_Closed_Text.style.display='none'; Codehighlighter1_834_859_Open_Image.style.display='inline'; Codehighlighter1_834_859_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">set</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span id="Codehighlighter1_834_859_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_834_859_Open_Text"><span style="color: rgb(0, 0, 0);">{&nbsp;</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._address&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;value;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;[Property,ValidateRegExp(</span><span style="color: rgb(0, 0, 0);">@"</span><span style="color: rgb(0, 0, 0);">\d{6}</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)]<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;Post<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_945_1025_Open_Image" onclick="this.style.display='none'; Codehighlighter1_945_1025_Open_Text.style.display='none'; Codehighlighter1_945_1025_Closed_Image.style.display='inline'; Codehighlighter1_945_1025_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_945_1025_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_945_1025_Closed_Text.style.display='none'; Codehighlighter1_945_1025_Open_Image.style.display='inline'; Codehighlighter1_945_1025_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_945_1025_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_945_1025_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_960_981_Open_Image" onclick="this.style.display='none'; Codehighlighter1_960_981_Open_Text.style.display='none'; Codehighlighter1_960_981_Closed_Image.style.display='inline'; Codehighlighter1_960_981_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_960_981_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_960_981_Closed_Text.style.display='none'; Codehighlighter1_960_981_Open_Image.style.display='inline'; Codehighlighter1_960_981_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">get</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span id="Codehighlighter1_960_981_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_960_981_Open_Text"><span style="color: rgb(0, 0, 0);">{&nbsp;</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._post;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_996_1018_Open_Image" onclick="this.style.display='none'; Codehighlighter1_996_1018_Open_Text.style.display='none'; Codehighlighter1_996_1018_Closed_Image.style.display='inline'; Codehighlighter1_996_1018_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_996_1018_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_996_1018_Closed_Text.style.display='none'; Codehighlighter1_996_1018_Open_Image.style.display='inline'; Codehighlighter1_996_1018_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">set</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span id="Codehighlighter1_996_1018_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_996_1018_Open_Text"><span style="color: rgb(0, 0, 0);">{&nbsp;</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._post&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;value;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;[Property,ValidateRegExp(</span><span style="color: rgb(0, 0, 0);">@"</span><span style="color: rgb(0, 0, 0);">(\(\d{3,4}\)|\d{3,4}-)?\d{8}</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)]<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;Phone<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_1132_1214_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1132_1214_Open_Text.style.display='none'; Codehighlighter1_1132_1214_Closed_Image.style.display='inline'; Codehighlighter1_1132_1214_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_1132_1214_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_1132_1214_Closed_Text.style.display='none'; Codehighlighter1_1132_1214_Open_Image.style.display='inline'; Codehighlighter1_1132_1214_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_1132_1214_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_1132_1214_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_1147_1169_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1147_1169_Open_Text.style.display='none'; Codehighlighter1_1147_1169_Closed_Image.style.display='inline'; Codehighlighter1_1147_1169_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_1147_1169_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_1147_1169_Closed_Text.style.display='none'; Codehighlighter1_1147_1169_Open_Image.style.display='inline'; Codehighlighter1_1147_1169_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">get</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span id="Codehighlighter1_1147_1169_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_1147_1169_Open_Text"><span style="color: rgb(0, 0, 0);">{&nbsp;</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._phone;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_1184_1207_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1184_1207_Open_Text.style.display='none'; Codehighlighter1_1184_1207_Closed_Image.style.display='inline'; Codehighlighter1_1184_1207_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_1184_1207_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_1184_1207_Closed_Text.style.display='none'; Codehighlighter1_1184_1207_Open_Image.style.display='inline'; Codehighlighter1_1184_1207_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">set</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span id="Codehighlighter1_1184_1207_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_1184_1207_Open_Text"><span style="color: rgb(0, 0, 0);">{&nbsp;</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._phone&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;value;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">&nbsp;DeleteAll()<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_1263_1323_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1263_1323_Open_Text.style.display='none'; Codehighlighter1_1263_1323_Closed_Image.style.display='inline'; Codehighlighter1_1263_1323_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_1263_1323_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_1263_1323_Closed_Text.style.display='none'; Codehighlighter1_1263_1323_Open_Image.style.display='inline'; Codehighlighter1_1263_1323_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_1263_1323_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_1263_1323_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ActiveRecordBase.DeleteAll(</span><span style="color: rgb(0, 0, 255);">typeof</span><span style="color: rgb(0, 0, 0);">(Custom));<br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);">&nbsp;Custom[]&nbsp;FindAll()<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_1374_1453_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1374_1453_Open_Text.style.display='none'; Codehighlighter1_1374_1453_Closed_Image.style.display='inline'; Codehighlighter1_1374_1453_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_1374_1453_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_1374_1453_Closed_Text.style.display='none'; Codehighlighter1_1374_1453_Open_Image.style.display='inline'; Codehighlighter1_1374_1453_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_1374_1453_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_1374_1453_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">&nbsp;((Custom[])(ActiveRecordBase.FindAll(</span><span style="color: rgb(0, 0, 255);">typeof</span><span style="color: rgb(0, 0, 0);">(Custom))));<br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top">}</span></span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><br>编写一些简单的测试代码，大家有兴趣可以看一下：<span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p></o:p></span></p>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="none.gif" align="top"><span style="color: rgb(0, 0, 0);">[Test]<br><img src="none.gif" align="top"><br><img src="none.gif" align="top"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">&nbsp;TestNameValidation()<br><img src="none.gif" align="top"><br><img id="Codehighlighter1_42_401_Open_Image" onclick="this.style.display='none'; Codehighlighter1_42_401_Open_Text.style.display='none'; Codehighlighter1_42_401_Closed_Image.style.display='inline'; Codehighlighter1_42_401_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_42_401_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_42_401_Closed_Text.style.display='none'; Codehighlighter1_42_401_Open_Image.style.display='inline'; Codehighlighter1_42_401_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"></span><span id="Codehighlighter1_42_401_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_42_401_Open_Text"><span style="color: rgb(0, 0, 0);">{&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">姓名为空</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;Custom&nbsp;custom&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;Custom();<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;custom.Address&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">TianJin</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;custom.Email&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"><span><a href="mailto:lhj_cauc@hotmail.com" class="smarterwiki-linkify">lhj_cauc@hotmail.com</a></span></span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;custom.Phone&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">022-24096356</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;custom.Post&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">300192</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">错误消息数</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">&nbsp;expectedError&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;Assert.IsFalse(custom.IsValid());<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;Assert.AreEqual(expectedError,custom.ValidationErrorMessages.Length);<br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top">}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"><br><img src="none.gif" align="top">&nbsp;<br><img src="none.gif" align="top"><br><img src="none.gif" align="top">[Test]<br><img src="none.gif" align="top"><br><img src="none.gif" align="top"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">&nbsp;TestPostValidation()<br><img src="none.gif" align="top"><br><img id="Codehighlighter1_449_845_Open_Image" onclick="this.style.display='none'; Codehighlighter1_449_845_Open_Text.style.display='none'; Codehighlighter1_449_845_Closed_Image.style.display='inline'; Codehighlighter1_449_845_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_449_845_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_449_845_Closed_Text.style.display='none'; Codehighlighter1_449_845_Open_Image.style.display='inline'; Codehighlighter1_449_845_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"></span><span id="Codehighlighter1_449_845_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_449_845_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">邮政编码错误、Email错误</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;Custom&nbsp;custom&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;Custom();<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;custom.Name&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Terry&nbsp;Lee</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;custom.Email&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">lhj_cauc#hotmail.com</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;custom.Phone&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">022-24096356</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;custom.Post&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">222t</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;custom.Address&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Tianjin</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">错误消息数</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">&nbsp;expectedError&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">2</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;Assert.IsFalse(custom.IsValid());<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;Assert.AreEqual(expectedError,custom.ValidationErrorMessages.Length);<br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top">}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"><br><img src="none.gif" align="top">&nbsp;<br><img src="none.gif" align="top"><br><img src="none.gif" align="top">[Test]<br><img src="none.gif" align="top"><br><img src="none.gif" align="top"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">&nbsp;TestAllValidation()<br><img src="none.gif" align="top"><br><img id="Codehighlighter1_892_1282_Open_Image" onclick="this.style.display='none'; Codehighlighter1_892_1282_Open_Text.style.display='none'; Codehighlighter1_892_1282_Closed_Image.style.display='inline'; Codehighlighter1_892_1282_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_892_1282_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_892_1282_Closed_Text.style.display='none'; Codehighlighter1_892_1282_Open_Image.style.display='inline'; Codehighlighter1_892_1282_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"></span><span id="Codehighlighter1_892_1282_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_892_1282_Open_Text"><span style="color: rgb(0, 0, 0);">{&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">全部正确</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;Custom&nbsp;custom&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;Custom();<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;custom.Name&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Terry&nbsp;Lee</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;custom.Email&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"><span><a href="mailto:lhj_cauc@hotmail.com" class="smarterwiki-linkify">lhj_cauc@hotmail.com</a></span></span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;custom.Phone&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">022-24096335</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;custom.Address&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">TianJin</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;custom.Post&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">300192</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">错误消息数</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">&nbsp;expectedError&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;Assert.IsTrue(custom.IsValid());<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;Assert.AreEqual(expectedError,custom.ValidationErrorMessages.Length);<br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top">}</span></span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;">&nbsp;</p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><b style=""><span style="font-size: 10pt; color: rgb(0, 102, 153); line-height: 150%; font-family: 宋体;">三．如何扩展</span></b><b style=""><span style="font-size: 10pt; color: rgb(0, 102, 153); line-height: 150%;" lang="EN-US"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">上面这些验证已经能够满足我们绝大多数的需求，但是我们也可以去添加自己的验证。来看看</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">ActiveRecord</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">中的</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">Validation</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">的类结构图（只画出了部分）</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%; text-align: center;" align="center"><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"></v:path><o:lock v:ext="edit" aspectratio="t"></o:lock></v:shapetype><img alt="" src="activerecord_0201.jpg" border="0"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">通过上图可以看到，如果想添加自己的验证，需要有一个继承</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">AbstractValidator</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">和继承于</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">AbstractValidationAttribute</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">的类就可以了，具体可以参考</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">ActiveRecord</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">的代码。</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><b style=""><span style="font-size: 10pt; color: rgb(0, 102, 153); line-height: 150%; font-family: 宋体;">四．深入分析验证</span></b><b style=""><span style="font-size: 10pt; color: rgb(0, 102, 153); line-height: 150%;" lang="EN-US"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">通过上面的分析我们都知道所有的实体类都继承于</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">ActiveRecordValidationBase</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">基类，那么<span lang="EN-US">ActiveRecord</span>是如何通过特性来进行验证的呢？下面我们结合源码进一步分析一下。<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">我们在属性上加上了验证， <span lang="EN-US">Attribute</span>并不做任何实质性的工作，它只是调用验证器进行验证，先来看一下<span lang="EN-US">ValidateNotEmptyAttribute</span>的代码：</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;"></span></p>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="none.gif" align="top"><span style="color: rgb(0, 0, 0);">[Serializable]<br><img src="none.gif" align="top"><br><img src="none.gif" align="top"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">&nbsp;ValidateNotEmptyAttribute&nbsp;:&nbsp;AbstractValidationAttribute<br><img src="none.gif" align="top"><br><img id="Codehighlighter1_86_302_Open_Image" onclick="this.style.display='none'; Codehighlighter1_86_302_Open_Text.style.display='none'; Codehighlighter1_86_302_Closed_Image.style.display='inline'; Codehighlighter1_86_302_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_86_302_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_86_302_Closed_Text.style.display='none'; Codehighlighter1_86_302_Open_Image.style.display='inline'; Codehighlighter1_86_302_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"></span><span id="Codehighlighter1_86_302_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_86_302_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;ValidateNotEmptyAttribute()&nbsp;:&nbsp;</span><span style="color: rgb(0, 0, 255);">base</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;NullCheckValidator())<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_166_173_Open_Image" onclick="this.style.display='none'; Codehighlighter1_166_173_Open_Text.style.display='none'; Codehighlighter1_166_173_Closed_Image.style.display='inline'; Codehighlighter1_166_173_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_166_173_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_166_173_Closed_Text.style.display='none'; Codehighlighter1_166_173_Open_Image.style.display='inline'; Codehighlighter1_166_173_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_166_173_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_166_173_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;ValidateNotEmptyAttribute(String&nbsp;errorMessage)&nbsp;:&nbsp;</span><span style="color: rgb(0, 0, 255);">base</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;NullCheckValidator(),&nbsp;errorMessage)<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_289_299_Open_Image" onclick="this.style.display='none'; Codehighlighter1_289_299_Open_Text.style.display='none'; Codehighlighter1_289_299_Closed_Image.style.display='inline'; Codehighlighter1_289_299_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_289_299_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_289_299_Closed_Text.style.display='none'; Codehighlighter1_289_299_Open_Image.style.display='inline'; Codehighlighter1_289_299_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_289_299_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_289_299_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top">}</span></span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left"><br>所有验证工作都是在<span lang="EN-US">Validator</span>中进行的，以<span lang="EN-US">NullCheckValidator</span>为例来看它做了什么操作：<span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">&nbsp;</span></p>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="none.gif" align="top"><span style="color: rgb(0, 0, 0);">[Serializable]<br><img src="none.gif" align="top"><br><img src="none.gif" align="top"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">&nbsp;NullCheckValidator&nbsp;:&nbsp;AbstractValidator<br><img src="none.gif" align="top"><br><img id="Codehighlighter1_69_420_Open_Image" onclick="this.style.display='none'; Codehighlighter1_69_420_Open_Text.style.display='none'; Codehighlighter1_69_420_Closed_Image.style.display='inline'; Codehighlighter1_69_420_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_69_420_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_69_420_Closed_Text.style.display='none'; Codehighlighter1_69_420_Open_Image.style.display='inline'; Codehighlighter1_69_420_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"></span><span id="Codehighlighter1_69_420_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_69_420_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;NullCheckValidator()<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_109_119_Open_Image" onclick="this.style.display='none'; Codehighlighter1_109_119_Open_Text.style.display='none'; Codehighlighter1_109_119_Closed_Image.style.display='inline'; Codehighlighter1_109_119_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_109_119_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_109_119_Closed_Text.style.display='none'; Codehighlighter1_109_119_Open_Image.style.display='inline'; Codehighlighter1_109_119_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_109_119_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_109_119_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">override</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">bool</span><span style="color: rgb(0, 0, 0);">&nbsp;Perform(</span><span style="color: rgb(0, 0, 255);">object</span><span style="color: rgb(0, 0, 0);">&nbsp;instance,&nbsp;</span><span style="color: rgb(0, 0, 255);">object</span><span style="color: rgb(0, 0, 0);">&nbsp;fieldValue)<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_199_279_Open_Image" onclick="this.style.display='none'; Codehighlighter1_199_279_Open_Text.style.display='none'; Codehighlighter1_199_279_Closed_Image.style.display='inline'; Codehighlighter1_199_279_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_199_279_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_199_279_Closed_Text.style.display='none'; Codehighlighter1_199_279_Open_Image.style.display='inline'; Codehighlighter1_199_279_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_199_279_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_199_279_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">&nbsp;fieldValue&nbsp;</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">&amp;&amp;</span><span style="color: rgb(0, 0, 0);">&nbsp;fieldValue.ToString().Length&nbsp;</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">protected</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">override</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;BuildErrorMessage()<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_340_417_Open_Image" onclick="this.style.display='none'; Codehighlighter1_340_417_Open_Text.style.display='none'; Codehighlighter1_340_417_Closed_Image.style.display='inline'; Codehighlighter1_340_417_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_340_417_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_340_417_Closed_Text.style.display='none'; Codehighlighter1_340_417_Open_Image.style.display='inline'; Codehighlighter1_340_417_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_340_417_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_340_417_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">&nbsp;String.Format(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">{0}&nbsp;is&nbsp;not&nbsp;optional.</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">,&nbsp;Property.Name);<br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top">}</span></span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left"><br>这个类其实很简单，但我们注意到有一个<span lang="EN-US">Perform</span>的方法，正是这个方法完成了验证工作，拿这个例子来说，如果字段的值为空或长度等于零就返回<span lang="EN-US">false</span>，否则为<span lang="EN-US">true</span>。对于正则验证等其他的也都是在这个方法中完成。回到<span lang="EN-US">ActiveRecordValidationBase</span>中去，看这个类初始化的时候做了什么操作？<span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">&nbsp;</p>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img id="Codehighlighter1_0_75_Open_Image" onclick="this.style.display='none'; Codehighlighter1_0_75_Open_Text.style.display='none'; Codehighlighter1_0_75_Closed_Image.style.display='inline'; Codehighlighter1_0_75_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_0_75_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_0_75_Closed_Text.style.display='none'; Codehighlighter1_0_75_Open_Image.style.display='inline'; Codehighlighter1_0_75_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"><span id="Codehighlighter1_0_75_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">/**/</span><span id="Codehighlighter1_0_75_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;summary&gt;</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;Constructs&nbsp;an&nbsp;ActiveRecordValidationBase<br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;/summary&gt;</span><span style="color: rgb(128, 128, 128);"></span></span><br><img src="none.gif" align="top"><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;ActiveRecordValidationBase()<br><img src="none.gif" align="top"><br><img id="Codehighlighter1_114_159_Open_Image" onclick="this.style.display='none'; Codehighlighter1_114_159_Open_Text.style.display='none'; Codehighlighter1_114_159_Closed_Image.style.display='inline'; Codehighlighter1_114_159_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_114_159_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_114_159_Closed_Text.style.display='none'; Codehighlighter1_114_159_Open_Image.style.display='inline'; Codehighlighter1_114_159_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"></span><span id="Codehighlighter1_114_159_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_114_159_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;CollectValidators(&nbsp;</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">.GetType()&nbsp;);<br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top">}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"><br><img src="none.gif" align="top">&nbsp;<br><img src="none.gif" align="top"><br><img id="Codehighlighter1_165_296_Open_Image" onclick="this.style.display='none'; Codehighlighter1_165_296_Open_Text.style.display='none'; Codehighlighter1_165_296_Closed_Image.style.display='inline'; Codehighlighter1_165_296_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_165_296_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_165_296_Closed_Text.style.display='none'; Codehighlighter1_165_296_Open_Image.style.display='inline'; Codehighlighter1_165_296_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"></span><span id="Codehighlighter1_165_296_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">/**/</span><span id="Codehighlighter1_165_296_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;summary&gt;</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;Collect&nbsp;the&nbsp;validations&nbsp;applied&nbsp;to&nbsp;this&nbsp;class&nbsp;properties.<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;/summary&gt;</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;param&nbsp;name="targetType"&gt;&lt;/param&gt;</span><span style="color: rgb(128, 128, 128);"></span></span><br><img src="none.gif" align="top"><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"></span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">&nbsp;CollectValidators(&nbsp;Type&nbsp;targetType&nbsp;)<br><img src="none.gif" align="top"><br><img id="Codehighlighter1_349_782_Open_Image" onclick="this.style.display='none'; Codehighlighter1_349_782_Open_Text.style.display='none'; Codehighlighter1_349_782_Closed_Image.style.display='inline'; Codehighlighter1_349_782_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_349_782_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_349_782_Closed_Text.style.display='none'; Codehighlighter1_349_782_Open_Image.style.display='inline'; Codehighlighter1_349_782_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"></span><span id="Codehighlighter1_349_782_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_349_782_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;ActiveRecordModel&nbsp;model&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;GetModel(&nbsp;targetType&nbsp;);<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">&nbsp;(model&nbsp;</span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">)<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_438_583_Open_Image" onclick="this.style.display='none'; Codehighlighter1_438_583_Open_Text.style.display='none'; Codehighlighter1_438_583_Closed_Image.style.display='inline'; Codehighlighter1_438_583_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_438_583_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_438_583_Closed_Text.style.display='none'; Codehighlighter1_438_583_Open_Image.style.display='inline'; Codehighlighter1_438_583_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_438_583_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_438_583_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">throw</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;ActiveRecordException(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Seems&nbsp;that&nbsp;the&nbsp;framework&nbsp;wasn't&nbsp;initialized&nbsp;properly.&nbsp;(ActiveRecordModel&nbsp;could&nbsp;not&nbsp;obtained)</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;__validators.AddRange(&nbsp;model.Validators&nbsp;);<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">while</span><span style="color: rgb(0, 0, 0);">(&nbsp;model.Parent&nbsp;</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">&nbsp;)<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_679_779_Open_Image" onclick="this.style.display='none'; Codehighlighter1_679_779_Open_Text.style.display='none'; Codehighlighter1_679_779_Closed_Image.style.display='inline'; Codehighlighter1_679_779_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_679_779_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_679_779_Closed_Text.style.display='none'; Codehighlighter1_679_779_Open_Image.style.display='inline'; Codehighlighter1_679_779_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_679_779_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_679_779_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__validators.AddRange(&nbsp;model.Parent.Validators&nbsp;);<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;model&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;model.Parent;<br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top">}</span></span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">&nbsp;</p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">在初始化的时候，通过</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">ActiveRecordModel</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">获取到当前实体所有属性对应的</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">Validator</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">，并放在了一个</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">ArrayList</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">中去，然后在</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">IsValid()</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">方法中再逐一调用</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">Validator</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">的</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">Perform()</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">方法来判断验证是否通过，因为所有的验证器都实现了<span lang="EN-US">Ivalidator</span>。如果有验证发生错误，则把错误信息保存再一个字符数组中，可以通过属性<span lang="EN-US">ValidationErrorMessages</span>来获取错误信息。<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="none.gif" align="top"><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">bool</span><span style="color: rgb(0, 0, 0);">&nbsp;IsValid()<br><img src="none.gif" align="top"><br><img id="Codehighlighter1_23_884_Open_Image" onclick="this.style.display='none'; Codehighlighter1_23_884_Open_Text.style.display='none'; Codehighlighter1_23_884_Closed_Image.style.display='inline'; Codehighlighter1_23_884_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_23_884_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_23_884_Closed_Text.style.display='none'; Codehighlighter1_23_884_Open_Image.style.display='inline'; Codehighlighter1_23_884_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"></span><span id="Codehighlighter1_23_884_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_23_884_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;ArrayList&nbsp;errorlist&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;ArrayList();<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;__failedProperties&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;Hashtable();<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">foreach</span><span style="color: rgb(0, 0, 0);">(IValidator&nbsp;validator&nbsp;</span><span style="color: rgb(0, 0, 255);">in</span><span style="color: rgb(0, 0, 0);">&nbsp;__validators)<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_171_771_Open_Image" onclick="this.style.display='none'; Codehighlighter1_171_771_Open_Text.style.display='none'; Codehighlighter1_171_771_Closed_Image.style.display='inline'; Codehighlighter1_171_771_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_171_771_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_171_771_Closed_Text.style.display='none'; Codehighlighter1_171_771_Open_Image.style.display='inline'; Codehighlighter1_171_771_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_171_771_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_171_771_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">&nbsp;(</span><span style="color: rgb(0, 0, 0);">!</span><span style="color: rgb(0, 0, 0);">validator.Perform(</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">))<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_221_764_Open_Image" onclick="this.style.display='none'; Codehighlighter1_221_764_Open_Text.style.display='none'; Codehighlighter1_221_764_Closed_Image.style.display='inline'; Codehighlighter1_221_764_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_221_764_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_221_764_Closed_Text.style.display='none'; Codehighlighter1_221_764_Open_Image.style.display='inline'; Codehighlighter1_221_764_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_221_764_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_221_764_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;errorMessage&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;validator.ErrorMessage;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;errorlist.Add(&nbsp;errorMessage&nbsp;);<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ArrayList&nbsp;items&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">&nbsp;(__failedProperties.Contains(validator.Property))<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_462_554_Open_Image" onclick="this.style.display='none'; Codehighlighter1_462_554_Open_Text.style.display='none'; Codehighlighter1_462_554_Closed_Image.style.display='inline'; Codehighlighter1_462_554_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_462_554_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_462_554_Closed_Text.style.display='none'; Codehighlighter1_462_554_Open_Image.style.display='inline'; Codehighlighter1_462_554_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_462_554_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_462_554_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;items&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;(ArrayList)&nbsp;__failedProperties[validator.Property];<br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">else</span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_587_712_Open_Image" onclick="this.style.display='none'; Codehighlighter1_587_712_Open_Text.style.display='none'; Codehighlighter1_587_712_Closed_Image.style.display='inline'; Codehighlighter1_587_712_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_587_712_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_587_712_Closed_Text.style.display='none'; Codehighlighter1_587_712_Open_Image.style.display='inline'; Codehighlighter1_587_712_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_587_712_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_587_712_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;items&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;ArrayList();<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__failedProperties[validator.Property]&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;items;<br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;items.Add(errorMessage);<br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;_errorMessages&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;(String[])&nbsp;errorlist.ToArray(&nbsp;</span><span style="color: rgb(0, 0, 255);">typeof</span><span style="color: rgb(0, 0, 0);">(String)&nbsp;);<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">&nbsp;errorlist.Count&nbsp;</span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top">}</span></span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">在</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">ActiveRecord</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">中的数据有效性验证就介绍到这儿了，下篇我会介绍</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">ActiveRecord</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">常用的一些技巧。</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">[</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">非常感谢</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">idior</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">大哥提出的意见</span><span style="font-size: 10pt; line-height: 150%;" lang="EN-US">]<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%;" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><b style=""><span style="font-size: 10pt; color: rgb(0, 102, 153); line-height: 150%; font-family: 宋体;">参考资料<span lang="EN-US"><o:p></o:p></span></span></b></p>
<span style="font-size: 10pt; font-family: 宋体;" lang="EN-US">Castle</span><span style="font-size: 10pt; font-family: 宋体;">的官方网站<span lang="EN-US"><span><a href="http://www.castleproject.org/" class="smarterwiki-linkify">http://www.castleproject.org</a></span></span></span> 
<div id="MySignature">作者：<a href="http://terrylee.cnblogs.com/">TerryLee</a><br>
出处：<a href="http://terrylee.cnblogs.com/">http://terrylee.cnblogs.com</a>
<br>
本文版权归作者和博客园共有，欢迎转载，但未经作者同意必须保留此段声明，且在文章页面明显位置给出原文连接，否则保留追究法律责任的权利。
</div>
<div id="digg_block">
<div id="div_digg">										
	<div class="diggit" onclick="DiggIt(374173,14203,1)"> 
		<span class="diggnum" id="digg_count_374173">0</span>
	</div>
	<div class="buryit" onclick="DiggIt(374173,14203,2)"> 
		<span class="burynum" id="bury_count_374173">0</span>
	</div>
	<div class="clear"></div>
	<span style="display: none;" id="span_isdigged_374173">0</span>	
	<div class="diggword" id="digg_word_374173">(请您对文章做出评价)</div>	
</div>
</div>
<div class="clear"></div>
<div id="post_next_prev">
<a href="http://www.cnblogs.com/Terrylee/archive/2006/04/12/373493.html">« </a> 上一篇：<a href="http://www.cnblogs.com/Terrylee/archive/2006/04/12/373493.html" title="发布于2006-04-12 17:26">求职新玩法：如今用MSN也可以求职</a><br>
<a href="http://www.cnblogs.com/Terrylee/archive/2006/04/14/374829.html">» </a> 下一篇：<a href="http://www.cnblogs.com/Terrylee/archive/2006/04/14/374829.html" title="发布于2006-04-14 08:34">Castle ActiveRecord学习实践（9）：使用ActiveRecord的一些技巧</a><br>
</div>








		</div>
		<div class="postDesc">posted @ 2006-04-13 12:27 <a href="http://www.cnblogs.com/Terrylee/">TerryLee</a> 阅读(7240) <a href="#commentform">评论(9)</a> &nbsp;<a href="http://www.cnblogs.com/Terrylee/admin/EditPosts.aspx?postid=374173">编辑</a> <a href="http://www.cnblogs.com/Terrylee/AddToFavorite.aspx?id=374173">收藏</a> <a href="#" onclick="PutInWz();return false;">网摘</a>  所属分类: <a href="http://www.cnblogs.com/Terrylee/category/48535.html">[11]&nbsp;&nbsp;数据持久</a>, <a href="http://www.cnblogs.com/Terrylee/category/53293.html">[12]&nbsp;&nbsp;开源世界</a></div>
	</div>
	<img src="374173.html" height="1" width="1">
	
<!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
<rdf:Description
rdf:about="http://www.cnblogs.com/Terrylee/archive/2006/04/13/374173.html"
dc:identifier="http://www.cnblogs.com/Terrylee/archive/2006/04/13/374173.html"
dc:title=""
trackback:ping="http://www.cnblogs.com/Terrylee/services/trackbacks/374173.aspx" />
</rdf:RDF>
-->

</div><!--end: topics 文章、评论容器-->
<a name="pagedcomment"></a>
<!--done-->
<br>
<div class="feedback_area_title">发表评论</div>
<div class="feedbackNoItems"><span id="span_comment_maxid" style="display: none;">1011441</span></div>
	

		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("idior",374221,"RBU1XawfBS+i6k6WTADXTrUA9Kpg4P3mFC0GzyYYDYi6hveNAXAhTg==")' href="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(374221,"RBU1XawfBS+i6k6WTADXTrUA9Kpg4P3mFC0GzyYYDYi6hveNAXAhTg==")' href="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=idior" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl00_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl00$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl00_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#374221">#1楼</a><a name="374221" id="comment_anchor_374221"></a>2006-04-13 13:29 | <a id="Comments1_CommentList_ctl00_NameLink" href="http://www.cnblogs.com/idior/" target="_top">idior</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/idior" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_374221" class="blog_comment_body">如果深入介绍一下利用属性来验证的实现方法，就更好了。</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Terrylee",374278,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(374278,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Terrylee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl01_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl01$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl01_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#374278">#2楼</a><a name="374278" id="comment_anchor_374278"></a>[<span class="louzhu">楼主</span>]2006-04-13 14:30 | <a id="Comments1_CommentList_ctl01_NameLink" href="http://www.cnblogs.com/Terrylee/" target="_top">Terrylee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Terrylee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_374278" class="blog_comment_body">@idior
<br>多谢idior大哥的指点，对于Castle我也是刚开始研究
<br>
<br>我回去再研究研究，争取把这篇补充完整一下：）</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("关注",374413,"")' href="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(374413,"")' href="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html#commentform">引用</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl02_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl02$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl02_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#374413">#3楼</a><a name="374413" id="comment_anchor_374413"></a>2006-04-13 16:40 | <a id="Comments1_CommentList_ctl02_NameLink" target="_blank">关注[未注册用户]</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_374413" class="blog_comment_body">你的类图用什么工具画的呀?</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Terrylee",374445,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(374445,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Terrylee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl03_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl03$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl03_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#374445">#4楼</a><a name="374445" id="comment_anchor_374445"></a>[<span class="louzhu">楼主</span>]2006-04-13 17:01 | <a id="Comments1_CommentList_ctl03_NameLink" href="http://www.cnblogs.com/Terrylee/" target="_top">Terrylee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Terrylee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_374445" class="blog_comment_body">@关注
<br>用MS Visio画的。</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("wolfpzp",427165,"")' href="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(427165,"")' href="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html#commentform">引用</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl04_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl04$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl04_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#427165">#5楼</a><a name="427165" id="comment_anchor_427165"></a>2006-06-16 09:14 | <a id="Comments1_CommentList_ctl04_NameLink" target="_blank">wolfpzp[未注册用户]</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_427165" class="blog_comment_body">从第一篇看到第八篇了，感觉真不错！
<br>验证性上如果自定义校验能介绍的更详细就更好了。</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("kevinhgy",568788,"")' href="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(568788,"")' href="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html#commentform">引用</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl05_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl05$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl05_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#568788">#6楼</a><a name="568788" id="comment_anchor_568788"></a>2006-11-22 16:05 | <a id="Comments1_CommentList_ctl05_NameLink" target="_blank">kevinhgy[未注册用户]</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_568788" class="blog_comment_body">这些文章真的不错</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("TerryLee",570301,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(570301,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=TerryLee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl06_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl06$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl06_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#570301">#7楼</a><a name="570301" id="comment_anchor_570301"></a>[<span class="louzhu">楼主</span>]2006-11-23 20:57 | <a id="Comments1_CommentList_ctl06_NameLink" href="http://www.cnblogs.com/Terrylee/" target="_top">TerryLee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/TerryLee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_570301" class="blog_comment_body">@kevinhgy
<br>呵呵，谢谢支持</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Andy@Dragon",945460,"hJjH9I3qMVFo7/LrR+ZOsmjE/vj+yX0exHbBrGXdvQL7v9tvWAJZJA==")' href="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(945460,"hJjH9I3qMVFo7/LrR+ZOsmjE/vj+yX0exHbBrGXdvQL7v9tvWAJZJA==")' href="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Andy%40Dragon" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl07_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl07$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl07_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#945460">#8楼</a><a name="945460" id="comment_anchor_945460"></a>2007-11-01 11:48 | <a id="Comments1_CommentList_ctl07_NameLink" href="http://www.cnblogs.com/chy8219/" target="_top">Andy@Dragon</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Andy%40Dragon" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_945460" class="blog_comment_body">不錯的文章，關注中。。。</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Gavin.W.Lai(赖文华)",1011441,"UlTMZIQkm9PGI5YKpkyMtnaPZ48H4aRTrYmiiWm/ugiM2oSEP1BK3A==")' href="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1011441,"UlTMZIQkm9PGI5YKpkyMtnaPZ48H4aRTrYmiiWm/ugiM2oSEP1BK3A==")' href="http://terrylee.cnblogs.com/archive/2006/04/13/374173.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Gavin.W.Lai%28%e8%b5%96%e6%96%87%e5%8d%8e%29" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl08_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl08$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl08_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#1011441">#9楼</a><a name="1011441" id="comment_anchor_1011441"></a><a name="Post"></a>2007-12-23 13:28 | <a id="Comments1_CommentList_ctl08_NameLink" href="http://www.cnblogs.com/GavinCome/" target="_top">Gavin.W.Lai(赖文华)</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Gavin.W.Lai%28%e8%b5%96%e6%96%87%e5%8d%8e%29" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_1011441" class="blog_comment_body">初学中，向前辈取经了！</span><br>
			</div>
		</div>
	

<div id="ctl05_comment_form" class="commentform">




<div id="ctl05_divLoginPannel">
<div class="login_tips">注册用户登录后才能发表评论，请 <a href="http://passport.cnblogs.com/login.aspx?ReturnUrl=http%3a%2f%2fterrylee.cnblogs.com%2farchive%2f2006%2f04%2f13%2f374173.html%3flogin%3d1%23commentform" class="underline">登录</a> 或 <a href="http://passport.cnblogs.com/register.aspx?ReturnUrl=http%3a%2f%2fterrylee.cnblogs.com%2farchive%2f2006%2f04%2f13%2f374173.html%23Bottom2" class="underline">注册</a> 。</div>
</div>

<div class="itnews c_ad_block" id="itnews">
<a href="http://news.cnblogs.com/" target="_top">IT新闻</a>:<br>

          ·  <a href="http://news.cnblogs.com/n/55114/" target="_top">谷歌联手亚马逊在英国推出Android音乐商店</a><br>
	
          ·  <a href="http://news.cnblogs.com/n/55112/" target="_top">Facebook成为Apache软件基金会黄金赞助商</a><br>
	
          ·  <a href="http://news.cnblogs.com/n/55111/" target="_top">IBM荣获2009年美国专利申请冠军</a><br>
	
          ·  <a href="http://news.cnblogs.com/n/55100/" target="_top">麦当劳美国餐馆Wi-Fi服务全面免费</a><br>
	
          ·  <a href="http://news.cnblogs.com/n/55097/" target="_top">Java SE 6更新，性能大幅提升</a><br>
	
</div>


<div id="ad_under_comment" class="c_ad_block">
<a href="http://a4.yeshj.com/rd/34138/" target="_top">每天10分钟，轻松学英语</a><br><br>
<div id="google_ads_div_cnblogs_blogpost_bottom1">
<iframe src="index_1.html" style="border: 0pt none ;" marginheight="0" marginwidth="0" name="google_ads_iframe_cnblogs_blogpost_bottom1" id="google_ads_iframe_cnblogs_blogpost_bottom1" scrolling="no" frameborder="0" height="60" width="468"></iframe></div>

<br>
<div id="google_ads_div_cnblogs_blogpost_bottom">
<iframe src="index_2.html" style="border: 0pt none ;" marginheight="0" marginwidth="0" name="google_ads_iframe_cnblogs_blogpost_bottom" id="google_ads_iframe_cnblogs_blogpost_bottom" scrolling="no" frameborder="0" height="250" width="300"></iframe></div>

</div>
<div id="site_nav_under" class="c_ad_block">
网站导航：<br>
<a href="http://www.cnblogs.com/" target="_top">博客园首页</a> &nbsp;<a href="http://news.cnblogs.com/" target="_top">IT新闻</a> &nbsp;<a href="http://home.cnblogs.com/" target="_top">个人主页</a> &nbsp;<a href="http://home.cnblogs.com/ing/" target="_top">闪存</a> &nbsp;<a href="http://job.cnblogs.com/" target="_top">程序员招聘</a> &nbsp;<a href="http://space.cnblogs.com/" target="_top">社区</a> &nbsp;<a href="http://space.cnblogs.com/q/" target="_top">博问</a> &nbsp;<a href="http://wz.cnblogs.com/" target="_top">网摘</a>
</div>
<div id="ad_under_comment2" class="c_ad_block">
<a href="http://www.china-pub.com/STATIC07/0912/zh_ndcx_091212.asp" target="_top"><img src="chinapub_20091222.jpg" alt="" style="border: 0px none ;"></a><br>
<a href="http://www.china-pub.com/itbook/" target="_top">China-pub 计算机图书网上专卖店！6.5万品种2-8折！</a><br>
<a href="http://www.china-pub.com/static07/0901/zh_jueba_090121.asp" target="_top">China-Pub 计算机绝版图书按需印刷服务</a><br>
</div>

<div id="relative_search"><br><b>相关搜索:</b><br> <a href="http://zzk.cnblogs.com/s?w=%5b11%5d%e6%95%b0%e6%8d%ae%e6%8c%81%e4%b9%85" target="_top">[11]数据持久</a> <a href="http://zzk.cnblogs.com/s?w=%5b12%5d%e5%bc%80%e6%ba%90%e4%b8%96%e7%95%8c" target="_top">[12]开源世界</a> </div><div id="relative_search"><br><b>在知识库中查看：</b><br> <a href="http://kb.cnblogs.com/a/374173/">Castle ActiveRecord学习实践（8）：数据有效性的验证</a></div>

</div>


				
	</div><!--end: forFlow -->
	</div><!--end: mainContent 主体内容容器-->

	<div id="sideBar">
		<div id="sideBarMain">
			
<!--done-->
<div class="newsItem">
<h3 class="catListTitle">公告</h3>
	<div class="box">
<h3 class="boxtitle">个人简介</h3>
<ul>
    <li><img src="o_terrylee.png" alt=""></li>
    <li>网名：TerryLee</li>
    <li>本名：李会军</li>
    <li>位置：中国 北京</li>
    <li>请大家发邮件至</li>
    <li><img src="o_terrylee_cnblogs.png" alt="TerryLee"></li>
   </ul>
</div>
<div class="box">
<h3 class="boxtitle">关注我</h3>
<a href="http://twitter.com/TerryLeeTech"><img src="followme.png" alt="在Twitter上关注我" style="margin-left: 5px;"></a>
<a href="http://www.dotneteye.cn/blog/syndication.axd"><img src="feedadd.png" alt="订阅我的Blog" style="margin-left: 15px;"></a>
</div>
<div class="box">
<h3 class="boxtitle">我的著作</h3>
<ul>
    <li><img alt="" src="o_silverlight02.jpg" border="0"></li>
    <li>官网：<a href="http://www.dotneteye.cn/silverlight">《Silverlight 2完美征程》</a></li>
</ul>
</div>
<div class="box">
<h3 class="boxtitle">我在说</h3>
<ul id="twitter_update_list"></ul>
<a href="http://twitter.com/TerryLeeTech" id="twitter-link" style="display: block; text-align: right;">follow me on Twitter</a>
</div>
<div class="box">
<h3 class="boxtitle">MVP配置</h3>
<ul>
    <li><img alt="" src="o_o_mvp_horizontal_fullcolor_182_74.png" border="0"></li>
    <li><a href="https://mvp.support.microsoft.com/profile=8FECB25C-0CBC-432F-9F25-E2698DDF3CA1">MVP配置</a></li>
</ul>
</div>
<div class="box">
<h3 class="boxtitle">个人主页</h3>
<ul>
<li>
<a href="http://www.dotneteye.cn/"><img src="o_dotnet.png" alt=""></a>
</li>
</ul>
</div>
<div class="box">
<h3 class="boxtitle">版权声明</h3>
    <ul>
        <li>本站采用<a href="http://creativecommons.org/licenses/by-nc/2.5/" target="_top" rel="license">创作共用</a>许可
        署名，非商业
<a href="http://www.51.la/?00260513" target="_top"><img alt="51.la 专业、免费、强健的访问统计" src="icon_8.gif" style="border: medium none ;"></a>
<img style="width: 0px; height: 0px;" src="go.asp">
        </li></ul>
    </div>
<div class="box">
<h3 class="boxtitle">绿色通道</h3>
  <ul>
   <li>1.<a href="http://www.cnblogs.com/Terrylee/archive/2008/03/09/Silverlight2-step-by-step-Tutorials.html">一步一步学Silverlight 2系列</a></li>
<li>2.<a href="http://www.cnblogs.com/Terrylee/archive/2006/07/17/334911.html">.NET设计模式系列文章</a></li>
<li>3.<a href="http://www.cnblogs.com/Terrylee/archive/2006/11/12/558683.html">ASP.NET AJAX入门系列</a></li>
<li>4.<a href="http://www.cnblogs.com/Terrylee/archive/2006/04/28/387503.html">Castle开发系列文章</a></li>
<li>5.<a href="http://www.cnblogs.com/Terrylee/archive/2006/08/01/464591.html">Enterprise Library系列</a></li>
<li><a href="http://dotnet.cnblogs.com/">博客园.NET频道</a></li>
  </ul>
</div><div id="profile_block"><a href="http://home.cnblogs.com/Terrylee/" target="_top">我的主页</a>&nbsp; <a href="http://home.cnblogs.com/Terrylee/detail/" target="_top">个人资料</a><br><a href="http://home.cnblogs.com/Terrylee/ing/" target="_top">我的闪存</a>&nbsp; <a href="http://space.cnblogs.com/msg/send/TerryLee" target="_top">发短消息</a></div>
</div>

			
			
			<div id="leftcontentcontainer">
				

<div class="mySearch">
<h3 class="catListTitle">搜索</h3>
<div class="div_my_zzk"><input value="" id="q" onkeydown="return zzk_go_enter(event);" class="input_my_zzk" type="text">&nbsp;<input onclick="zzk_go()" value="找找看" id="btnZzk" class="btn_my_zzk" type="button"></div>
</div>
<div class="catListPostCategory">
<h3 class="catListTitle">随笔分类</h3>

<ul>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl01_Link" href="http://www.cnblogs.com/Terrylee/category/48779.html">[01]&nbsp;&nbsp;.NET大本营(50)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl01_RssLink" title="Subscribe to [01]&amp;nbsp;&amp;nbsp;.NET大本营(50)" href="http://www.cnblogs.com/Terrylee/category/48779.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl02_Link" href="http://www.cnblogs.com/Terrylee/category/161309.html">[02]&nbsp;&nbsp;探微知著CLR</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl02_RssLink" title="Subscribe to [02]&amp;nbsp;&amp;nbsp;探微知著CLR" href="http://www.cnblogs.com/Terrylee/category/161309.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl03_Link" href="http://www.cnblogs.com/Terrylee/category/78190.html">[03]&nbsp;&nbsp;银光点亮世界(62)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl03_RssLink" title="Subscribe to [03]&amp;nbsp;&amp;nbsp;银光点亮世界(62)" href="http://www.cnblogs.com/Terrylee/category/78190.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl04_Link" href="http://www.cnblogs.com/Terrylee/category/36734.html">[04]&nbsp;&nbsp;WCF后传(17)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl04_RssLink" title="Subscribe to [04]&amp;nbsp;&amp;nbsp;WCF后传(17)" href="http://www.cnblogs.com/Terrylee/category/36734.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl05_Link" href="http://www.cnblogs.com/Terrylee/category/36516.html">[05]&nbsp;&nbsp;架构与设计(24)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl05_RssLink" title="Subscribe to [05]&amp;nbsp;&amp;nbsp;架构与设计(24)" href="http://www.cnblogs.com/Terrylee/category/36516.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl06_Link" href="http://www.cnblogs.com/Terrylee/category/48778.html">[06]&nbsp;&nbsp;LINQ之美(4)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl06_RssLink" title="Subscribe to [06]&amp;nbsp;&amp;nbsp;LINQ之美(4)" href="http://www.cnblogs.com/Terrylee/category/48778.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl07_Link" href="http://www.cnblogs.com/Terrylee/category/115628.html">[07]&nbsp;&nbsp;AJAX风云(15)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl07_RssLink" title="Subscribe to [07]&amp;nbsp;&amp;nbsp;AJAX风云(15)" href="http://www.cnblogs.com/Terrylee/category/115628.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl08_Link" href="http://www.cnblogs.com/Terrylee/category/37512.html">[08]&nbsp;&nbsp;Web开发(66)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl08_RssLink" title="Subscribe to [08]&amp;nbsp;&amp;nbsp;Web开发(66)" href="http://www.cnblogs.com/Terrylee/category/37512.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl09_Link" href="http://www.cnblogs.com/Terrylee/category/124829.html">[09]&nbsp;&nbsp;依赖注入(14)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl09_RssLink" title="Subscribe to [09]&amp;nbsp;&amp;nbsp;依赖注入(14)" href="http://www.cnblogs.com/Terrylee/category/124829.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl10_Link" href="http://www.cnblogs.com/Terrylee/category/36514.html">[10]&nbsp;&nbsp;模式与实践(68)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl10_RssLink" title="Subscribe to [10]&amp;nbsp;&amp;nbsp;模式与实践(68)" href="http://www.cnblogs.com/Terrylee/category/36514.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl11_Link" href="http://www.cnblogs.com/Terrylee/category/48535.html">[11]&nbsp;&nbsp;数据持久(19)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl11_RssLink" title="Subscribe to [11]&amp;nbsp;&amp;nbsp;数据持久(19)" href="http://www.cnblogs.com/Terrylee/category/48535.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl12_Link" href="http://www.cnblogs.com/Terrylee/category/53293.html">[12]&nbsp;&nbsp;开源世界(35)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl12_RssLink" title="Subscribe to [12]&amp;nbsp;&amp;nbsp;开源世界(35)" href="http://www.cnblogs.com/Terrylee/category/53293.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl13_Link" href="http://www.cnblogs.com/Terrylee/category/44974.html">[13]&nbsp;&nbsp;代码生成(23)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl13_RssLink" title="Subscribe to [13]&amp;nbsp;&amp;nbsp;代码生成(23)" href="http://www.cnblogs.com/Terrylee/category/44974.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl14_Link" href="http://www.cnblogs.com/Terrylee/category/48958.html">[14]&nbsp;&nbsp;测试与重构(3)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl14_RssLink" title="Subscribe to [14]&amp;nbsp;&amp;nbsp;测试与重构(3)" href="http://www.cnblogs.com/Terrylee/category/48958.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl15_Link" href="http://www.cnblogs.com/Terrylee/category/124830.html">[15]&nbsp;&nbsp;工作流基础</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl15_RssLink" title="Subscribe to [15]&amp;nbsp;&amp;nbsp;工作流基础" href="http://www.cnblogs.com/Terrylee/category/124830.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl16_Link" href="http://www.cnblogs.com/Terrylee/category/162553.html">[16]&nbsp;&nbsp;技术曲苑杂坛(1)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl16_RssLink" title="Subscribe to [16]&amp;nbsp;&amp;nbsp;技术曲苑杂坛(1)" href="http://www.cnblogs.com/Terrylee/category/162553.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl17_Link" href="http://www.cnblogs.com/Terrylee/category/160783.html">[17]&nbsp;&nbsp;并行编程(1)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl17_RssLink" title="Subscribe to [17]&amp;nbsp;&amp;nbsp;并行编程(1)" href="http://www.cnblogs.com/Terrylee/category/160783.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl18_Link" href="http://www.cnblogs.com/Terrylee/category/58451.html">[18]&nbsp;&nbsp;动态语言(4)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl18_RssLink" title="Subscribe to [18]&amp;nbsp;&amp;nbsp;动态语言(4)" href="http://www.cnblogs.com/Terrylee/category/58451.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl19_Link" href="http://www.cnblogs.com/Terrylee/category/187123.html">[19] 写作生涯(2)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl19_RssLink" title="Subscribe to [19] 写作生涯(2)" href="http://www.cnblogs.com/Terrylee/category/187123.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl20_Link" href="http://www.cnblogs.com/Terrylee/category/36735.html">[20]&nbsp;&nbsp;推荐系列(32)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl20_RssLink" title="Subscribe to [20]&amp;nbsp;&amp;nbsp;推荐系列(32)" href="http://www.cnblogs.com/Terrylee/category/36735.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl21_Link" href="http://www.cnblogs.com/Terrylee/category/36515.html">[21]&nbsp;&nbsp;数据库相关(18)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl21_RssLink" title="Subscribe to [21]&amp;nbsp;&amp;nbsp;数据库相关(18)" href="http://www.cnblogs.com/Terrylee/category/36515.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl22_Link" href="http://www.cnblogs.com/Terrylee/category/43288.html">[30]&nbsp;&nbsp;前沿报道(28)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl22_RssLink" title="Subscribe to [30]&amp;nbsp;&amp;nbsp;前沿报道(28)" href="http://www.cnblogs.com/Terrylee/category/43288.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl23_Link" href="http://www.cnblogs.com/Terrylee/category/36511.html">[31]&nbsp;&nbsp;项目管理(3)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl23_RssLink" title="Subscribe to [31]&amp;nbsp;&amp;nbsp;项目管理(3)" href="http://www.cnblogs.com/Terrylee/category/36511.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl24_Link" href="http://www.cnblogs.com/Terrylee/category/148211.html">[32]&nbsp;&nbsp;我点我评(2)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl24_RssLink" title="Subscribe to [32]&amp;nbsp;&amp;nbsp;我点我评(2)" href="http://www.cnblogs.com/Terrylee/category/148211.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl25_Link" href="http://www.cnblogs.com/Terrylee/category/51852.html">[33]&nbsp;&nbsp;我思我考(13)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl25_RssLink" title="Subscribe to [33]&amp;nbsp;&amp;nbsp;我思我考(13)" href="http://www.cnblogs.com/Terrylee/category/51852.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl26_Link" href="http://www.cnblogs.com/Terrylee/category/51900.html">[34]&nbsp;&nbsp;社区活动(9)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl26_RssLink" title="Subscribe to [34]&amp;nbsp;&amp;nbsp;社区活动(9)" href="http://www.cnblogs.com/Terrylee/category/51900.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl27_Link" href="http://www.cnblogs.com/Terrylee/category/36507.html">[35]&nbsp;&nbsp;东拉西扯(37)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl27_RssLink" title="Subscribe to [35]&amp;nbsp;&amp;nbsp;东拉西扯(37)" href="http://www.cnblogs.com/Terrylee/category/36507.html/rss">(rss)</a></li>

</ul>

</div>

<div class="catListPostArchive">
<h3 class="catListTitle">随笔档案</h3>

<ul>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl01_Link" href="http://www.cnblogs.com/Terrylee/archive/2009/08.html">2009年8月 (1)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl02_Link" href="http://www.cnblogs.com/Terrylee/archive/2009/05.html">2009年5月 (1)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl03_Link" href="http://www.cnblogs.com/Terrylee/archive/2009/04.html">2009年4月 (3)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl04_Link" href="http://www.cnblogs.com/Terrylee/archive/2009/01.html">2009年1月 (2)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl05_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/12.html">2008年12月 (4)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl06_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/11.html">2008年11月 (10)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl07_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/10.html">2008年10月 (12)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl08_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/09.html">2008年9月 (3)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl09_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/08.html">2008年8月 (5)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl10_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/07.html">2008年7月 (13)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl11_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/06.html">2008年6月 (10)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl12_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/03.html">2008年3月 (41)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl13_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/02.html">2008年2月 (5)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl14_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/01.html">2008年1月 (13)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl15_Link" href="http://www.cnblogs.com/Terrylee/archive/2007/12.html">2007年12月 (15)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl16_Link" href="http://www.cnblogs.com/Terrylee/archive/2007/11.html">2007年11月 (7)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl17_Link" href="http://www.cnblogs.com/Terrylee/archive/2007/07.html">2007年7月 (3)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl18_Link" href="http://www.cnblogs.com/Terrylee/archive/2007/04.html">2007年4月 (2)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl19_Link" href="http://www.cnblogs.com/Terrylee/archive/2007/03.html">2007年3月 (4)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl20_Link" href="http://www.cnblogs.com/Terrylee/archive/2007/02.html">2007年2月 (2)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl21_Link" href="http://www.cnblogs.com/Terrylee/archive/2007/01.html">2007年1月 (6)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl22_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/12.html">2006年12月 (18)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl23_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/11.html">2006年11月 (32)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl24_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/10.html">2006年10月 (35)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl25_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/09.html">2006年9月 (19)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl26_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/08.html">2006年8月 (16)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl27_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/07.html">2006年7月 (23)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl28_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/06.html">2006年6月 (11)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl29_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/05.html">2006年5月 (13)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl30_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/04.html">2006年4月 (24)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl31_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/03.html">2006年3月 (17)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl32_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/02.html">2006年2月 (13)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl33_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/01.html">2006年1月 (13)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl34_Link" href="http://www.cnblogs.com/Terrylee/archive/2005/12.html">2005年12月 (38)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl35_Link" href="http://www.cnblogs.com/Terrylee/archive/2005/11.html">2005年11月 (20)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl36_Link" href="http://www.cnblogs.com/Terrylee/archive/2005/10.html">2005年10月 (27)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl37_Link" href="http://www.cnblogs.com/Terrylee/archive/2005/09.html">2005年9月 (10)</a> </li>

</ul>

</div>

<div class="catList">
<h3 class="catListTitle">个人站点</h3>

<ul>

<li><a id="SingleColumn1_Categories_CatList_ctl02_LinkList_ctl01_Link" href="http://terrylee.blog.51cto.com/" target="_top">TerryLee @ 51CTO</a> <a id="SingleColumn1_Categories_CatList_ctl02_LinkList_ctl01_RssLink" title="Subscribe to TerryLee @ 51CTO" href="http://terrylee.blog.51cto.com/">(rss)</a></li>
<li style="margin-top: 2px;">我在51CTO的镜像</li>
<li><a id="SingleColumn1_Categories_CatList_ctl02_LinkList_ctl02_Link" href="http://weblogs.asp.net/TerryLee/" target="_top">TerryLee @ ASP.NET</a> <a id="SingleColumn1_Categories_CatList_ctl02_LinkList_ctl02_RssLink" title="Subscribe to TerryLee @ ASP.NET" href="http://weblogs.asp.net/terrylee/rss.aspx">(rss)</a></li>
<li style="margin-top: 2px;">我在ASP.NET网站</li>
<li><a id="SingleColumn1_Categories_CatList_ctl02_LinkList_ctl03_Link" href="http://space.itpub.net/12184684/" target="_top">TerryLee @ IT168</a> <a id="SingleColumn1_Categories_CatList_ctl02_LinkList_ctl03_RssLink" title="Subscribe to TerryLee @ IT168" href="http://space.itpub.net/12184684/action-rss-type-">(rss)</a></li>
<li style="margin-top: 2px;">我在IT168的镜像</li>
<li><a id="SingleColumn1_Categories_CatList_ctl02_LinkList_ctl04_Link" href="http://blog.joycode.com/terrylee/" target="_top">TerryLee @ 博客堂</a> <a id="SingleColumn1_Categories_CatList_ctl02_LinkList_ctl04_RssLink" title="Subscribe to TerryLee @ 博客堂" href="http://blog.joycode.com/terrylee/Rss.aspx">(rss)</a></li>
<li style="margin-top: 2px;">我在博客堂的一片天地</li>
<li><a id="SingleColumn1_Categories_CatList_ctl02_LinkList_ctl05_Link" href="http://www.dotneteye.cn/" target="_top">个人主页</a> </li>

</ul>

</div>

<div class="catList">
<h3 class="catListTitle">我的好友</h3>

<ul>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl01_Link" href="http://chwkai.cnblogs.com/" target="_top">Aero</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl01_RssLink" title="Subscribe to Aero" href="http://chwkai.cnblogs.com/Rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl02_Link" href="http://anchky.cnblogs.com/" target="_top">anchky</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl02_RssLink" title="Subscribe to anchky" href="http://anchky.cnblogs.com/Rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl03_Link" href="http://www.cnblogs.com/anytao">Anytao</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl03_RssLink" title="Subscribe to Anytao" href="http://www.cnblogs.com/anytao/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl04_Link" href="http://www.cnblogs.com/autumoon" target="_top">Autumoon</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl04_RssLink" title="Subscribe to Autumoon" href="http://www.cnblogs.com/Autumoon/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl05_Link" href="http://www.cnblogs.com/renrenqq/" target="_top">DDL</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl05_RssLink" title="Subscribe to DDL" href="http://www.cnblogs.com/renrenqq/Rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl06_Link" href="http://dflying.cnblogs.com/" target="_top">Dflying Chen</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl06_RssLink" title="Subscribe to Dflying Chen" href="http://dflying.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl07_Link" href="http://dudu.cnblogs.com/" target="_top">Dudu</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl07_RssLink" title="Subscribe to Dudu" href="http://dudu.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl08_Link" href="http://perhaps.cnblogs.com/" target="_top">Fantasy Soft</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl08_RssLink" title="Subscribe to Fantasy Soft" href="http://perhaps.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl09_Link" href="http://idior.cnblogs.com/" target="_top">idior</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl09_RssLink" title="Subscribe to idior" href="http://idior.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl10_Link" href="http://www.cnblogs.com/jessequ" target="_top">JesseQu</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl10_RssLink" title="Subscribe to JesseQu" href="http://www.cnblogs.com/jessequ/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl11_Link" href="http://www.cnblogs.com/Jillzhang" target="_top">Jillzhang</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl11_RssLink" title="Subscribe to Jillzhang" href="http://www.cnblogs.com/jillzhang/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl12_Link" href="http://kid-li.cnblogs.com/" target="_top">kid-li</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl12_RssLink" title="Subscribe to kid-li" href="http://kid-li.cnblogs.com/Rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl13_Link" href="http://luking.cnblogs.com/" target="_top">luking</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl13_RssLink" title="Subscribe to luking" href="http://luking.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl14_Link" href="http://www.cnblogs.com/michellehu" target="_top">MichelleHu</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl14_RssLink" title="Subscribe to MichelleHu" href="http://www.cnblogs.com/michellehu/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl15_Link" href="http://blog.csdn.net/priderock" target="_top">PrideRock的专栏</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl15_RssLink" title="Subscribe to PrideRock的专栏" href="http://feeds.feedsky.com/csdn.net/PrideRock">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl16_Link" href="http://www.cnblogs.com/isuper/" target="_top">RogerTong </a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl16_RssLink" title="Subscribe to RogerTong " href="http://www.cnblogs.com/isuper/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl17_Link" href="http://www.cnblogs.com/Sunmoonfire" target="_top">Sunmoonfire</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl17_RssLink" title="Subscribe to Sunmoonfire" href="http://www.cnblogs.com/Sunmoonfire/Rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl18_Link" href="http://www.cnblogs.com/teddyma" target="_top">Teddy</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl18_RssLink" title="Subscribe to Teddy" href="http://www.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl19_Link" href="http://www.cnblogs.com/wayfarer" target="_top">wayfarer</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl19_RssLink" title="Subscribe to wayfarer" href="http://www.cnblogs.com/wayfarer/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl20_Link" href="http://hjf1223.cnblogs.com/" target="_top">阿不</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl20_RssLink" title="Subscribe to 阿不" href="http://hjf1223.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl21_Link" href="http://www.cnblogs.com/bvbook" target="_top">博文视点官方博客</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl21_RssLink" title="Subscribe to 博文视点官方博客" href="http://www.cnblogs.com/bvbook/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl22_Link" href="http://www.cnblogs.com/herohuo" target="_top">大人物中的小人物</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl22_RssLink" title="Subscribe to 大人物中的小人物" href="http://www.cnblogs.com/herohuo/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl23_Link" href="http://www.cnblogs.com/dingxue" target="_top">丁学</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl23_RssLink" title="Subscribe to 丁学" href="http://www.cnblogs.com/dingxue/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl24_Link" href="http://www.cnblogs.com/guaiguai/" target="_top">怪怪</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl24_RssLink" title="Subscribe to 怪怪" href="http://www.cnblogs.com/guaiguai/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl25_Link" href="http://www.cnblogs.com/callwangxiang" target="_top">蜡笔小巢</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl25_RssLink" title="Subscribe to 蜡笔小巢" href="http://www.cnblogs.com/callwangxiang/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl26_Link" href="http://www.cnblogs.com/waxdoll/" target="_top">蜡人张</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl26_RssLink" title="Subscribe to 蜡人张" href="http://waxdoll.cnblogs.com/Rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl27_Link" href="http://www.cnblogs.com/jeffreyzhao" target="_top">老赵</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl27_RssLink" title="Subscribe to 老赵" href="http://www.cnblogs.com/JeffreyZhao/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl28_Link" href="http://www.joygee.com/" target="_top">李茹</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl28_RssLink" title="Subscribe to 李茹" href="feed://http//www.joygee.com/feed/">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl29_Link" href="http://www.agilelabs.cn/blogs/linkin/default.aspx" target="_top">卢彦</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl29_RssLink" title="Subscribe to 卢彦" href="http://www.agilelabs.cn/blogs/linkin/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl30_Link" href="http://zhenyulu.cnblogs.com/" target="_top">吕震宇</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl30_RssLink" title="Subscribe to 吕震宇" href="http://zhenyulu.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl31_Link" href="http://www.cnblogs.com/lbq1221119" target="_top">罗炳桥</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl31_RssLink" title="Subscribe to 罗炳桥" href="http://www.cnblogs.com/lbq1221119/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl32_Link" href="http://lixianhuei.cnblogs.com/" target="_top">难得一蠢</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl32_RssLink" title="Subscribe to 难得一蠢" href="http://lixianhuei.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl33_Link" href="http://birdshome.cnblogs.com/" target="_top">鸟食轩</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl33_RssLink" title="Subscribe to 鸟食轩" href="http://birdshome.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl34_Link" href="http://bear-study-hard.cnblogs.com/" target="_top">努力学习的熊</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl34_RssLink" title="Subscribe to 努力学习的熊" href="http://bear-study-hard.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl35_Link" href="http://blog.donews.com/crabhn/" target="_top">螃蟹</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl35_RssLink" title="Subscribe to 螃蟹" href="http://blog.donews.com/crabhn/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl36_Link" href="http://crysta10203.blog.sohu.com/" target="_top">水晶心情</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl36_RssLink" title="Subscribe to 水晶心情" href="http://tb.sogou.com/rss?ch=it&amp;desc=%CB%D1%BA%FC%B2%A9%BF%CD%B6%A9%D4%C4&amp;url=http://crysta10203.blog.sohu.com/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl37_Link" href="http://xh831213.cnblogs.com/" target="_top">小寒</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl37_RssLink" title="Subscribe to 小寒" href="http://xh831213.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl38_Link" href="http://overred.cnblogs.com/" target="_top">雁儿飞飞</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl38_RssLink" title="Subscribe to 雁儿飞飞" href="http://overred.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl39_Link" href="http://www.cnblogs.com/justinyoung" target="_top">杨正祎</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl39_RssLink" title="Subscribe to 杨正祎" href="http://www.cnblogs.com/JustinYoung/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl40_Link" href="http://goodcandle.cnblogs.com/" target="_top">源码工作室</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl40_RssLink" title="Subscribe to 源码工作室" href="http://goodcandle.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl41_Link" href="http://www.cnblogs.com/msdpe/" target="_top">张大磊</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl41_RssLink" title="Subscribe to 张大磊" href="http://www.cnblogs.com/msdpe/RSS.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl42_Link" href="http://www.cyworld.com.cn/qiansui" target="_top">张莹</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl43_Link" href="http://www.cnblogs.com/zhouyinhui" target="_top">周银辉</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl43_RssLink" title="Subscribe to 周银辉" href="http://www.cnblogs.com/zhouyinhui/rss">(rss)</a></li>

</ul>

</div>



<div class="catListBlogRank">
<h3 class="catListTitle">积分与排名</h3>
<ul>
	<li class="liScore">
		积分 -	5250874
	</li><li class="liRank">
		排名 -	3
	</li>
</ul>
</div>



<div class="catListView">
<h3 class="catListTitle">阅读排行榜</h3>
	
			<ul>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl01_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/07/17/334911.html">1.&nbsp;.NET设计模式系列文章(240785)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl02_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/11/12/ASPNET_AJAX_QuickStarts.html">2.&nbsp;ASP.NET AJAX入门系列(162046)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl03_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2007/12/09/the-ultimate-jquery-plugin-list.html">3.&nbsp;强烈推荐：240多个jQuery插件(160249)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl04_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2008/03/21/Silverlight2-step-by-step-Tutorials.html">4.&nbsp;一步一步学Silverlight 2系列文章(94439)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl05_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/10/25/ASPNET_AJAX_ScriptManager.html">5.&nbsp;ASP.NET AJAX入门系列（2）：使用ScriptManager控件(88540)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl06_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/08/01/Enterprise_Library.html">6.&nbsp;Enterprise Library系列文章回顾与总结(87348)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl07_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/04/28/castl_ioc_article.html">7.&nbsp;Castle 开发系列文章(87221)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl08_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/12/09/293509.html">8.&nbsp;.NET设计模式（2）：单件模式（Singleton Pattern）(85295)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl09_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/09/28/246050.html">9.&nbsp;今天下午真郁闷……(79632)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl10_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/12/13/295965.html">10.&nbsp;.NET设计模式（3）：抽象工厂模式（Abstract Factory）(73903)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl11_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/10/24/ASPNET_AJAX_Quick_Starts_Overview.html">11.&nbsp;ASP.NET AJAX入门系列（1）：概述(67798)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl12_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2008/03/07/Silverlight2-step-by-step-part1.html">12.&nbsp;一步一步学Silverlight 2系列（1）：创建一个基本的Silverlight应用(49550)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl13_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/01/04/310716.html">13.&nbsp;.NET设计模式（5）：工厂方法模式（Factory Method）(47209)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl14_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/10/29/ASPNET_AJAX_UpdatePanel_Part1.html">14.&nbsp;ASP.NET AJAX入门系列（4）：使用UpdatePanel控件（一）(44878)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl15_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/04/03/365762.html">15.&nbsp;Castle ActiveRecord学习实践（1）：快速入门指南(44506)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl16_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/12/09/293465.html">16.&nbsp;.NET设计模式（1）：开篇(36398)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl17_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/10/14/254631.html">17.&nbsp;Enterprise Library Step By Step系列（一）：配置应用程序块——入门篇(36023)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl18_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/12/19/299878.html">18.&nbsp;.NET设计模式（4）：建造者模式（Builder Pattern）(34152)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl19_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/12/28/306254.html">19.&nbsp;CodeSmith开发系列资料总结(30459)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl20_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/12/01/OpenSource_Framework_And_Resource_Recommendation_Overview.html">20.&nbsp;.NET开源项目介绍及资源推荐：序(30351)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl21_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2008/03/07/Silverlight2-step-by-step-part2.html">21.&nbsp;一步一步学Silverlight 2系列（2）：基本控件(29159)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl22_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/10/27/ASPNET_AJAX_ScriptManagerProxy.html">22.&nbsp;ASP.NET AJAX入门系列（3）：使用ScriptManagerProxy控件(28846)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl23_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/09/01/atlas_series_articles.html">23.&nbsp;Atlas学习手记系列(28339)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl24_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/10/23/Observer_Pattern.html">24.&nbsp;.NET设计模式（19）：观察者模式（Observer Pattern）(28231)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl25_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/11/01/ASPNET_AJAX_UpdatePanle_Part2.html">25.&nbsp;ASP.NET AJAX入门系列（5）：使用UpdatePanel控件（二）(27899)</a>
			</li>
		
			</ul>
		
</div>

<div class="catListFeedback">
<h3 class="catListTitle">评论排行榜</h3>
	
			<ul>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl01_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/10/13/253667.html">1.&nbsp;如何用SQLDMO在ASP.NET页面下实现数据库的备份与恢复(395)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl02_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/07/17/334911.html">2.&nbsp;.NET设计模式系列文章(355)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl03_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2009/01/05/LINQ-and-LINQ-to-SQL.html">3.&nbsp;不得不为LINQ说几句话，驳“LINQ已死”论(318)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl04_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2008/03/21/Silverlight2-step-by-step-Tutorials.html">4.&nbsp;一步一步学Silverlight 2系列文章(246)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl05_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/01/04/310968.html">5.&nbsp;CodeSmith3.0开发资料下载(233)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl06_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/12/13/295965.html">6.&nbsp;.NET设计模式（3）：抽象工厂模式（Abstract Factory）(216)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl07_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/05/23/406688.html">7.&nbsp;新版设计模式手册[C#]下载(216)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl08_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/10/25/ASPNET_AJAX_ScriptManager.html">8.&nbsp;ASP.NET AJAX入门系列（2）：使用ScriptManager控件(179)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl09_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2007/12/09/the-ultimate-jquery-plugin-list.html">9.&nbsp;强烈推荐：240多个jQuery插件(168)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl10_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/11/12/ASPNET_AJAX_QuickStarts.html">10.&nbsp;ASP.NET AJAX入门系列(168)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl11_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/04/03/365762.html">11.&nbsp;Castle ActiveRecord学习实践（1）：快速入门指南(166)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl12_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/04/28/castl_ioc_article.html">12.&nbsp;Castle 开发系列文章(164)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl13_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/10/23/Observer_Pattern.html">13.&nbsp;.NET设计模式（19）：观察者模式（Observer Pattern）(162)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl14_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/08/01/Enterprise_Library.html">14.&nbsp;Enterprise Library系列文章回顾与总结(158)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl15_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/01/04/310716.html">15.&nbsp;.NET设计模式（5）：工厂方法模式（Factory Method）(158)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl16_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/12/09/293509.html">16.&nbsp;.NET设计模式（2）：单件模式（Singleton Pattern）(153)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl17_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/03/21/354972.html">17.&nbsp;天津.NET俱乐部成立了！(146)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl18_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/10/29/ASPNET_AJAX_UpdatePanel_Part1.html">18.&nbsp;ASP.NET AJAX入门系列（4）：使用UpdatePanel控件（一）(133)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl19_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2007/12/04/TemplateEngine-Smart-Code-Preview.html">19.&nbsp;基于模板引擎的代码生成器Smart Code预览(129)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl20_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2008/03/07/Silverlight2-step-by-step-part1.html">20.&nbsp;一步一步学Silverlight 2系列（1）：创建一个基本的Silverlight应用(125)</a>
			</li>
		
			</ul>
		
</div>

			</div>
			
		</div><!--end: sideBarMain -->
	</div><!--end: sideBar 侧边栏容器 -->
	<div class="clear"></div>
	</div><!--end: main -->
	<div class="clear"></div>
	<div id="footer">
		
<!--done-->
Copyright ©2010 TerryLee
	</div><!--end: footer -->
</div><!--end: home 自定义的最大容器 -->
    </form>
	
	
      
    
    
    
</body>
</html>
